% Return the channel number associated to a channel name
%
% T. Vanderbruggen, 19/02/2014
function chan_num = GetChannelNum(chan_name)
    switch chan_name
        case 'CURR_ION_PUMP'
            chan_num = 5;
        case 'LOCK_FIB_LAS_1560'
            chan_num = 6;
        case 'MOT_BEAMS_POWER'
            chan_num = 7; 
        case 'LOCK_REPUMP'
            chan_num = 8;
        case 'LOCK_COOLER'
            chan_num = 13;
        case 'MOT_PD_FLUOR'
            chan_num = 14;
        case 'MOT_MAG_FIELD'
            chan_num = 15;
        case 'AC_LINE'
            chan_num = 16;
        case 'INTEGRATOR_COOLING_LOCK'
            chan_num = 17;
        case 'PD1'
            chan_num = 18;
        case 'PD_MONITOR_780'
            chan_num = 19;
        case 'PD_MONITOR_1529'
            chan_num = 20;
        case 'DROP_SIGNAL'
            chan_num = 21;
        case 'LOCK_FIB_LAS_1529'
            chan_num = 22;
        case 'PD_SIGNAL_1'
            chan_num = 23;
        case 'PIEZO_SIG_COOLER_LOCK'
            chan_num = 24;
        case 'X_COIL_CURR_MONITOR'
            chan_num = 25;
        case 'Y_COIL_CURR_MONITOR'
            chan_num = 26;
        case 'Z_COIL_CURR_MONITOR'
            chan_num = 27;
        otherwise
            error('GetChannelNum: Unknown channel name')
    end
end